﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LocalCosts.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->
    <script type='text/javascript' src="assets/js/Carrs.js"></script>
    <link rel="stylesheet" href="Assets/css/EditTableCell.css" type="text/css" />
    <script type='text/javascript' src="Assets/js/jquery-custom-1.0.0.js?v=2011"></script>
    <script type='text/javascript' src="assets/js/LocalCost.js"></script>
    <script type="text/javascript">
        function getUrlVars() {
            var vars = {};
            var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
                vars[key] = value;
            });
            return vars;
        }
        function doDelete(strID, strName) {
            if (confirm('Bạn có thực sự muốn xóa ' + strName + '?')) {
                var vnpage = getUrlVars()['page_number'];
                var vChar = getUrlVars()['letter'];
                var strHref = "";
                if (vnpage)
                    strHref = "LocalCosts.aspx?action=delete&ID=" + strID + "&page_number=" + vnpage;
                else
                    strHref = "LocalCosts.aspx?action=delete&ID=" + strID;

                if (vChar)
                    window.location.href = strHref + "&letter=" + vChar;
                else
                    window.location.href = strHref;
            }
        }
        $().ready(function () {
            $('#txtCarr').focus().autocomplete(carrs, { matchContains: true });
        });
    </script>
    <style type="text/css">
.thheader{
font-weight:bold;vertical-align:middle;text-align:center;
font-size:11px;
border:1px solid #ccc !important;
line-height: 7px !important;;
}
</style>
</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <h2>
                CHI PHÍ ĐỊA PHƯƠNG</h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmLocalCosts" runat="server">
                <%if (nPermissions >= 3) {%>
                <div id="addnewbox" style="display: none;">
                    <table class="adminedit" style="width: 100%;">
                        <tr style="background: #ECECEC;">
                            <!--th align="center" rowspan="3" class="thheader" >Sort</th-->
                            <th align="center" rowspan="3" class="thheader">
                                Carr
                            </th>
                            <th align="center" colspan="8" class="thheader">
                                Thc (USD/VND)
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                Seal
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                BL
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                Telex
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                ENS
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                LPF
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                CIC
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                EBS
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                Remark
                            </th>
                            <th align="center" rowspan="3" class="thheader">
                                VS CONT
                            </th>
                        </tr>
                        <tr style="background: #ECECEC; font-weight: bold; vertical-align: middle; text-align: center;">
                            <th align="center" colspan="4" class="thheader">
                                Export
                            </th>
                            <th align="center" colspan="4" class="thheader">
                                Import
                            </th>
                        </tr>
                        <tr style="background: #ECECEC; font-weight: bold; vertical-align: middle; text-align: center;">
                            <th align="center" class="thheader">
                                20'dc
                            </th>
                            <th align="center" class="thheader">
                                40'hc
                            </th>
                            <th align="center" class="thheader">
                                20'rf
                            </th>
                            <th align="center" class="thheader">
                                40'rf
                            </th>
                            <th align="center" class="thheader">
                                20'dc
                            </th>
                            <th align="center" class="thheader">
                                40'hc
                            </th>
                            <th align="center" class="thheader">
                                20'rf
                            </th>
                            <th align="center" class="thheader">
                                40'rf
                            </th>
                        </tr>
                        <tr>
                            <td style="display: none;">
                                <asp:TextBox class="cls" ID="txtSort" runat="server" Width="50px" TabIndex="1"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtCarr" runat="server" Width="100px" TabIndex="2"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtExport20DC" runat="server" Width="50px" TabIndex="3"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtExport40DC" runat="server" Width="50px" TabIndex="4"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtExport20RF" runat="server" Width="50px" TabIndex="5"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtExport40RF" runat="server" Width="50px" TabIndex="6"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtImport20DC" runat="server" Width="50px" TabIndex="7"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtImport40DC" runat="server" Width="50px" TabIndex="8"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtImport20RF" runat="server" Width="50px" TabIndex="9"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtImport40RF" runat="server" Width="50px" TabIndex="10"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtSeal" runat="server" Width="50px" TabIndex="12" Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtBL" runat="server" Width="50px" TabIndex="13" Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtTelex" runat="server" Width="50px" TabIndex="14"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtENS" runat="server" Width="50px" TabIndex="15" Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtLatePayMentFEE" runat="server" Width="100px" TabIndex="18"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtCIC" runat="server" Width="50px" TabIndex="11" Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtEBS" runat="server" Width="50px" TabIndex="17" Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtRemark" runat="server" Width="50px" TabIndex="16"
                                    Style="text-align: right;"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox class="cls" ID="txtVSCont" runat="server" Width="50px" TabIndex="16"
                                    Style="text-align: left;"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <table class="paramlist admintable" width="100%">
                        <tr>
                            <td colspan="2">
                                <asp:Button class="button" ID="btnSave" runat="server" TabIndex="19" Text="Save"
                                    OnClick="btnSave_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
                <%} %>
                <div class="content-box-header">
                    <h3 style="cursor: s-resize;">
                        CHI PHÍ ĐỊA PHƯƠNG</h3>
                    <input id="btnAddNew" type="button" style="float: right; margin: 9px 10px;" class="button"
                        value="Add new" />
                    <div class="clear">
                    </div>
                </div>
                <%=strAlphaBet%>
                <fieldset>
                    <asp:Repeater ID="rptData" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'" LocalCostID='<%#Eval("ID") %>'>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                </td>
                                <td editable="true" code="Carr" completesource="carrs">
                                    <%# DataBinder.Eval(Container.DataItem, "Carr")%>
                                </td>
                                <td editable="true" code="Export20DC">
                                    <%# DataBinder.Eval(Container.DataItem, "Export20DC")%>
                                </td>
                                <td editable="true" code="Export40DC">
                                    <%# DataBinder.Eval(Container.DataItem, "Export40DC")%>
                                </td>
                                <td editable="true" code="Export20RF">
                                    <%# DataBinder.Eval(Container.DataItem, "Export20RF")%>
                                </td>
                                <td editable="true" code="Export40RF">
                                    <%# DataBinder.Eval(Container.DataItem, "Export40RF")%>
                                </td>
                                <td editable="true" code="Import20DC">
                                    <%# DataBinder.Eval(Container.DataItem, "Import20DC")%>
                                </td>
                                <td editable="true" code="Import40DC">
                                    <%# DataBinder.Eval(Container.DataItem, "Import40DC")%>
                                </td>
                                <td editable="true" code="Import20RF">
                                    <%# DataBinder.Eval(Container.DataItem, "Import20RF")%>
                                </td>
                                <td editable="true" code="Import40RF">
                                    <%# DataBinder.Eval(Container.DataItem, "Import40RF")%>
                                </td>
                                <td editable="true" code="Seal">
                                    <%# DataBinder.Eval(Container.DataItem, "Seal")%>
                                </td>
                                <td editable="true" code="BL">
                                    <%# DataBinder.Eval(Container.DataItem, "BL")%>
                                </td>
                                <td editable="true" code="Telex">
                                    <%# DataBinder.Eval(Container.DataItem, "Telex")%>
                                </td>
                                <td editable="true" code="ENS">
                                    <%# DataBinder.Eval(Container.DataItem, "ENS")%>
                                </td>
                                <td editable="true" code="LatePayMentFEE">
                                    <%# DataBinder.Eval(Container.DataItem, "LatePayMentFEE")%>
                                </td>
                                <td editable="true" code="CIC">
                                    <%# DataBinder.Eval(Container.DataItem, "CIC")%>
                                </td>
                                <td editable="true" code="EBS">
                                    <%# DataBinder.Eval(Container.DataItem, "EBS")%>
                                </td>
                                <td editable="true" code="Remark">
                                    <%# DataBinder.Eval(Container.DataItem, "Remark")%>
                                </td>
                                <td editable="true" code="VSCont">
                                    <%# DataBinder.Eval(Container.DataItem, "VSCont")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "LastUpdate")%>
                                </td>
                                <%if ((Session["localcosts"] != null) && (int.Parse(Session["localcosts"].ToString()) >= 3))
                                                  {%>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                </td>
                                <%} %>
                            </tr>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist" editcellcontent="true">
                                <thead>
                                    <tr>
                                        <th align="center" rowspan="3" width="30px">
                                            Index
                                        </th>
                                        <th align="center" rowspan="3">
                                            Carr
                                        </th>
                                        <th align="center" colspan="8">
                                            Thc (USD/VND)
                                        </th>
                                        <th align="center" rowspan="3">
                                            Seal
                                        </th>
                                        <th align="center" rowspan="3">
                                            DOC
                                        </th>
                                        <th align="center" rowspan="3">
                                            Telex
                                        </th>
                                        <th align="center" rowspan="3">
                                            KHAI HQ AUTO
                                        </th>
                                        <th align="center" rowspan="3">
                                            LPF
                                        </th>
                                        <th align="center" rowspan="3">
                                            CIC
                                        </th>
                                        <th align="center" rowspan="3">
                                            EBS
                                        </th>
                                        <th align="center" rowspan="3">
                                            Remark
                                        </th>
                                        <th align="center" rowspan="3">
                                            VS CONT
                                        </th>
                                        <th align="center" rowspan="3">
                                            Update
                                        </th>
                                        <%if ((Session["localcosts"] != null) && (int.Parse(Session["localcosts"].ToString()) >= 3))
                                              {%>
                                        <th align="center" rowspan="3" width="70px">
                                            Action
                                        </th>
                                        <%} %>
                                    </tr>
                                    <tr>
                                        <th align="center" colspan="4">
                                            Export
                                        </th>
                                        <th align="center" colspan="4">
                                            Import
                                        </th>
                                    </tr>
                                    <tr style="background: #CCC;">
                                        <th align="center">
                                            20'dc
                                        </th>
                                        <th align="center">
                                            40'hc
                                        </th>
                                        <th align="center">
                                            20'rf
                                        </th>
                                        <th align="center">
                                            40'rf
                                        </th>
                                        <th align="center">
                                            20'dc
                                        </th>
                                        <th align="center">
                                            40'hc
                                        </th>
                                        <th align="center">
                                            20'rf
                                        </th>
                                        <th align="center">
                                            40'rf
                                        </th>
                                    </tr>
                                </thead>
                        </HeaderTemplate>
                        <FooterTemplate>
                            </TABLE>
                        </FooterTemplate>
                    </asp:Repeater>
                </fieldset>
                <div class="clear">
                </div>
                <div id="footer">
                    <%=strPager%>
                </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
